package com.niiwoo.civet.trade.dao.mapper;

import com.niiwoo.civet.trade.dao.entity.ProjectRate;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ProjectRateMapperExt extends ProjectRateMapper{

    /**
     * 查询标的费率配置集合
     * @param projectId
     * @param borrowUserId
     * @return
     */
    List<ProjectRate> queryProjectRateListOrderByCurrentPeriodAscByProjectIdAndBorrowUserId(@Param("projectId") Long projectId,
                                                                                            @Param("borrowUserId") String borrowUserId);


    /**
     * 根据用户Id和标的Id删除数据
     * @param borrowUserId
     * @param projectId
     * @return
     */
    int deleteByUserIdProjectId(@Param("borrowUserId") String borrowUserId,@Param("projectId") Long projectId);
}